Method and arrangement for correlating time bases between interconnected units

ABSTRACT

A system and arrangement for correlating time in different time bases used by interconnected units by timestamping a reference event with a time determined with respect to a first time base. A message unit provides the time to a second interconnected unit that uses a second time base. A translation device is configured to calculate a difference between the time measured by the first time base and in the second time base. The difference is used to translate a time measured by the first clock to a time in a different time base at run time.

CROSS REFERENCE TO RELATED APPLICATIONS

The present application is a continuation application of U.S. patentapplication Ser. No. 11/554,370 filed Oct. 30, 2006, the contents ofwhich are hereby incorporated by reference into this application, whichis a continuation under 35 U.S.C. 120 of International ApplicationPCT/SE2005/000581 filed on Apr. 21, 2005, the contents of which arehereby incorporated by reference into this application, which claimspriority to Swedish Application 0401130-0 filed on Apr. 30, 2004.

BACKGROUND

The present disclosure relates to a fixed and/or movable system, inparticular in or for vehicles, for example cars. The system operateswith common or related time bases for indication of the time of detectedor generated events in the system, and/or in a system or systemsconnected to this.

The present disclosure also relates to a device for effecting theestablishment of functions carried out by two or more units (nodes)comprised in the system in a fixed and/or movable system, in particularin or for vehicles, for example cars. The device can relate toarrangements for detection, control, analysis and/or simulation ofcomprised units.

The use of systems of this type in, for example, vehicles, is alreadyknown and reference can accordingly be made, among other things, to thepatent applications and patents submitted by and granted to the sameapplicant as the present applicant. In the respective systems, themessage and information (data) transmissions are carried out using or inaccordance with protocols of a known type, which can be of astandardized type, for example Universal Serial Bus (USB), ControllerArea Network (CAN), Local Interconnect Network (LIN), Ethernet, IEEE802.11x, Infrared (IR), Wireless USB (WUSB), etc.

With this type of system, there are problems in determining eventsand/or time functions without relatively complicated andbandwidth-intensive arrangements. There is, for example, a desire to beable to determine the occurrence of the events and/or give indicationsof the time so that the normal traffic can be utilized to indicate therelevant time and/or occurrence of the event, for example, without extrahardware needing to be involved. The object of the disclosure is, amongother things, to solve this problem. There is a need, in the respectivemodule units, to be able to operate with preferably small resources withthe object of simplifying the construction of the units. There shouldalso be great freedom of choice in the construction of systems and theirrelationships. This disclosure also solves this problem.

A major problem in distributed embedded control system is to synchronizethe generation of events in different nodes to each other in a timelymanner, e.g., reading sensor values, execution of movements, releasingof power etc. The main solution to this problem is to create a globaltime and synchronize clocks at each node. Usually the timesynchronization is made at the communication level. Typical examples areTTCAN, TTP and FlexRay protocols in the vehicle industry and SERCOS inthe factory automation industry. All of these communication protocolsare time triggered and it is a common opinion that safety criticaldistributed embedded control systems have to be based on a timetriggered communication. An alternative to synchronizing clocks is tohave each module relying on its own local clock and have a timetranslator recalculating the time of each clock to a common global time,but it has been regarded impossible to do in real time.

U.S. Pat. No. 5,896,524 suggests a method to recalculate clock readingsby associating event pairs related to each other. However, suchconventional methods cannot be used in realtime (e.g., see column 1,line 65 through column 2, line 4). What is needed is a method andapparatus that calculates the relationship between local clocks at runtime. What is further needed is to calculate the relationship betweenlocal clocks and a global time base at run time.

U.S. Patent Application Publication US2006-0143345A1 shows that, inrealtime systems at run time, it is more efficient to use different timedomains within the system, wherein each time domain is created accordingto the need of cooperating nodes, rather than to rely on a global time.However, a global time may be better used for analyzing a system.

Each system in which the disclosure can be used can be regarded asindividual, one or more series or sequences of events that are relatedto each other in time and space. There can be different timedescriptions and time frames within one and the same system. Smallersystems can be comprised in the system, which in turn can, now or later,be comprised in other systems. During the first stage, the “drawingboard” stage, of a system development, it is expedient to relate all theevents to one and the same time frame, for example related to thephysically defined second. The degree of coordination that is requiredof the different events in order for the required system function to beachieved can be analyzed in a first stage. In a second stage, ananalysis of the relationship of the individual events to each other canindicate that other time frames and the utilization of knowledgeconcerning the association of different events to each other cansimplify the design of the final system and the description,verification and validation of the same. The disclosure simplifies thesedevelopment processes.

For analysis or verification of systems, there is a need not only totimestamp events that have occurred, but also to know with whatprecision and/or accuracy the timestamping is carried out.

It can happen in systems that different parts of the system relateevents to different time bases, which in turn are related to each other.

Analysis and monitoring instruments of different types for vehicles areoften based on standard computers with operating systems, for example apersonal computer (PC) with WINDOWS XP®. The operating system (OS)simplifies the development of the software at the price of precision oftimestamping of external events. Therefore special units are introducedbetween the PC and the bus system that, among other things, comprise aclock for timestamping of incoming time messages. For example, with theutilization of the program CANANALYZER from the company VECTOR, aCANCARDXL from the same company is connected to the PC. The CANCARDXLhas a local clock and can timestamp messages from two CAN busses. Ifthere is a need for several CAN busses, an additional CANCARDXL unitmust be connected to the PC and the two CANCARDXL units must beconnected to a coordination unit via a coaxial cable arrangement inorder to synchronize their local clocks to a common time. By utilizingthe disclosure, timestamping can be carried out with great precision,utilizing only components to be found as standard in the PC.

SUMMARY

This disclosure addresses time synchronization in distributed embeddedcontrol systems by selecting specific events and their relation to thelocal time at different nodes ahead of time to be identified asreference events. A time translator can then filter out messages withtime stamps related to the reference events, and a respectivetransmitting node within the system. By defining the relationshipbetween a reference event, time-stamped according to a first clock at afirst node, and the time relation of the reference event to a secondclock, the time translator can recalculate the first time to the secondtime and vice versa at run time, i.e., in real time.

In addition, a reference event can generate several secondary events. Bydefining the relationship between such a reference event, its secondaryevents, the time stamping of these events, and how these time stamps aretransmitted to a time translator, a time translator can be programmed torecalculate the time at one time domain to the time at another timedomain at run time

An occurrence of the execution of a function can be arranged to be ableto be detected and determined by means of one or more devices thatperceive time, for example clocks, and/or devices that indicate events,which devices are comprised in one or more of the units that constituteor form module units in the system. The system can thereby include oneor more serial, distributed and protocol-utilizing systems. Therespective determination is to be arranged to form the basis of orinvoke functionality in the system and/or in monitoring, analyzing,verifying, completely or partially simulating or stimulating devices inthe system.

A consequence of the concept of the disclosure is that the same ordifferent events that are perceived or generated by different modules inthe same or different systems can be time related in a simple way. Themodules that are affected by the time relating can perceive certainevents at the same time, or alternatively certain different events forwhich the time relationship is known. Such events belong to the group“reference events”. The modules can be arranged to generate or detectreference events, display local clock function, be able to read offlocal time upon the detection or generation of a reference event andprovide time information on the basis of the value that was read offbeing sent to one or more translation units. The translation unit(s)then utilize these values in order to create a common time reference forthe modules and events concerned, with the result that it is possible tocreate time indications that are comparable. The translation unit can beconsidered to create a common time domain for relating events.Comparisons can be carried out in different time domains that can becreated by different translation units, which can utilize commonreference events. In an embodiment, the bit pattern in a communicationprotocol is utilized as reference event. For example, the Start Of Framebit (SOF) in CAN is suitable. More specifically, the sampling point inthe bit can be used, as certain CAN controllers, for example MCP 2515from MICROCHIP (Microchip Technology, Inc., 2355 West ChandlerBoulevard, Chandler, Ariz., USA, 85224-6199), generate a signal for thisthat can be used in order to trigger the requisite electronics for thereading off of local time for the occurrence of the event.

Further developments of the concept of the disclosure are apparent fromthe following.

For example, the system operates with event functions and accordinglyreference events can be utilized which can be related to one or morereference event generators. A reference event can be sent from a commonpoint and can refer to a common group. The reference events can occur atparticular intervals and can themselves define the clock function(compare with a Phase Locked Loop). The reference event detectors mustbe able to be placed in the units and accordingly a detector can beplaced in each unit. An interrupt generated by a selected protocol'scommunication circuit can be utilized as a detector. The respectivedetector can be set up by defining or implementing how it is to beobtained (for example, by connecting to a suitable layer in the protocolstack and searching there for a special packet/bit pattern/edge). Eventsmust be able to be related by group, for example with regard to sequenceor time. The group can work with a common starting point. Thus, forexample, a unit can communicate directly with all units in the group orat least send messages that all the other units can detect. The messagescan represent typical events. The respective message can, for example,include packets according to any serial communication standard, forexample the protocols mentioned in the introduction. The reference eventcan consist wholly or partially of a message. The USB protocol'sStart-of-Frame (SOF) packet can advantageously be selected as referenceevent. This packet is transmitted in the normal way and has a sequencenumber, which facilitates the correct association of timestamp toreference event. USB packets propagate in a USB system in a defined wayand a USB host can be regarded as a reference event generator in its owntime domain, distinct from other time domains, for example the domain inwhich a WINDOWS application operates, in the same PC as the USB host.The reference events can be transmitted to all units that are comprisedin the same USB arrangement, that is all units can listen to the sameevent, for example, at the same time. The phrase at the same time heremeans a maximum of 50-100 ns jitter in the detection for all the unitsplus up to a couple of hundred ns constant delays. A USB Hi-speedmaximal delay can be 26 ns in the cable, 4 ns in the “hub trace”, 36hs-bits in the hub electronics in a maximum of 5 levels plus 30 ns forconnecting in last unit, totaling 530 ns. A Hi-speed jitter due to theUSB protocol can be a maximum of 5 hs-bits per hub and a maximum of 5hubs can be connected, which gives a maximal uncertainty of 25 hs-bits,which corresponds to approximately 50 ns time inaccuracy for thepropagation of an SOF through a USB connection. A “hs-bit” is hereconsidered to be the duration of a hi-speed USB bit time i.e. 1/(480MHz), or approximately 2 ns.

In the embodiments, each unit can comprise a local clock which is ableto be read by or in the application in question. Timestamping can becarried out of each reference event and the timestamping is carried outpreferably with externally triggered capture register. Correctassociation of the timestamp with the reference event can be ensured.The timestamps can form the basis for relating clocks, time and events.The clocks or the read-off time must be able to be related. In addition,in an embodiment, a time master can be included, whose time is, ifrequired, to be regarded as global (in groups). In order to create atransitive relationship, that is even if two different units cannotdirectly relate their time to each other, this can still be achieved ifboth can relate their times to a utilized master or intermediate unit.The time master can, in turn, be synchronized or related to a secondreference, for example GPS. This gives the system access to a correctphysical second that can be used for physical calculations, for exampleengine speed, power, accelerations, etc. The location of the time mastercan be in a common point in the system concerned, can be separate or canhave another role in another unit. The role or the function can bechanged. In an embodiment, the system does not need to utilize anymaster unit, but instead the translation takes place in an all-to-allfunction. In addition, it should be pointed out that a time master doesnot need to have its own physical clock, but instead can construct avirtual clock function by utilizing timestamps of reference eventscarried out by and messages from modules with their own time domains,that are connected to the system. With knowledge of the relationships ofthe reference events and respective time domains to each other, the timemaster can transform the time information to a time domain of its ownand give respective time information referring to its own time domain toother units within or outside the system.

An important part for an efficient utilization of the disclosure is theactual development process for the device. In a first stage, the eventsare identified that are to be generated and detected and theirrelationships to a common notional time base relating to times and apermitted range around these, in order for the device to have therequired functionality. In a second stage, events are identified thatcan constitute reference points between different units, in order forthese to be able to detect, initiate or generate other events within therequired time range, relative or absolute. In a third stage, functionsare implemented in an actual design in order to achieve the requiredfunctionality. It should be pointed out that reference events aredefined at system level and that these do not need to be known at modulelevel. A basic idea in the disclosure is the concept of time. Eachinteraction between given event patterns can be regarded as having itsown time domain, that is the time frame is based on its own time tickgenerator (which can be linear or non-linear) and the time indication isgiven as the number of ticks, whole plus if required parts thereof,according to a linear or circular model. The different time domains canbe transformed from and to each other. Domains with circular model willappear as a cyclic course of events and those with a linear restrictedmodel as discrete intervals in a linear unrestricted model. For generalanalysis tools, it is expedient to utilize a linear unrestricted modelwith the physical second as time tick. Another basic idea in thedisclosure is the concept of a system. According to the disclosure, thesystem is regarded as a number of event functions that are coordinatedby a controlling unit, the sum of all the event functions. Thesefunctions can be of two types, event-generating or event-detecting. Thecoordination takes place in time and space. A part of the coordinationis carried out mechanically, and a part is carried out through theexchange of information between electronic units, of which a part of thelatter is carried out via serial communication, for example of the CANor USB type, directly or in combination. The system S is described withthe number n of subsidiary functions F as:

${S = {\sum\limits_{1}^{n}F_{i}}},$

where F_(i) is the sum of the number m of events h, that is

$F_{i} = {\sum\limits_{1}^{m}h_{j}}$

In the first stage, the system in one or a few time domains isdescribed, which system is well suited for describing and calculatingits characteristics, for example the time domain T. This can berepresented symbolically by:

${S(T)} = {\sum\limits_{1}^{n}{F_{i}(T)}}$${F_{i}(T)} = {\sum\limits_{1}^{m}{h_{j}(T)}}$

In the second stage, a number of events are identified that are mutuallyinterconnected between functions of interest and which are suitable forproviding a time domain for the functions. These events are designatedreference events. It is often expedient to have non-linear time ticks intime domains for event functions that are mechanically connected. Inaddition, reference events are identified that are connected in chains,that can be described mathematically, to different time domains.Starting from a generated event in a time domain, the detection of whichgenerates a further event (in the same or another time domain), which inturn is detected in another time domain, during the development work amathematical transfer function can be created between two time domainssimilar to a transformation of one coordinate system to another. Suchtransfer functions are implemented as required in the system's differentunits. The system can be described symbolically as follows:

S=ΣF _(i)(T _(q) T _(k), . . . )

T₁=∀T_(m), where ∀ is a transfer/reproduction operator between the timedomains 1 and m.

In an additional embodiment, one or more time coordinators can beutilized. These can delegate any role as time master and receive andsend timestamps of reference events. In this connection, thetransmission can be carried out to any translation units in order forthese to be able to calculate and translate the time in question. In anadditional embodiment, certain units carry out the actual translationfunction in question. The time coordinates can receive and send othertimestamps to any translation units. In an embodiment of the disclosure,the time coordinator is arranged in a common point in the system inquestion. The disclosure also takes into account the need for timetranslators to be included. Time translators handle the translation oftime for the units that do not carry out the translation themselves.

A time translator can be located anywhere in the system, but a locationin a common point is advantageous from the point of view of efficiency.A time translator can carry out translation from one unit to another viaa selected reference time or alternatively according to the all-to-allprinciple, that is directly from each unit to every other unit. In thisconnection, a logical translation matrix can be utilized. A matrix thatcan keep track of how translation is to be carried out rapidly fromall-to-all can, however, assume large dimensions and require substantialresources to keep updated (the complexity scales quadratically), butgives as a result faster translations. It is also possible to carry outthe time translation just by keeping the reference timestamps updated,but this results in more work per translation. The translation unit cankeep statistics of how well the clocks are related and can send themeasurement value together with this information as a parameter. Theinaccuracy can be calculated and sent with each measurement value. Thetranslation function can be carried out with greater accuracyafterwards, that is when an additional reference message has beenexchanged.

In connection with this, the derivative for the current period can, forexample, be used instead of assuming that the same derivative applies asin the preceding period. Expressed in more general terms, interpolationis used instead of extrapolation for indication of a value. This is ofparticularly great significance for analysis and verification of asystem's function. In short, it can be said that each unit/module thathas been given access to the occurrence of reference events in differenttime domains can be arranged to carry out translation between the timedomains, irrespective of whether the units/modules themselves arecomprised in or represent any of the domains or not. In order that noambivalences shall arise concerning the time domain to which aparticular indication belongs, protocols should be set up which, forexample, state who translates what and to what extent a unit'sincoming/outgoing indications are to be considered to belong to the timedomain of the transmitting and/or receiving unit.

The further developments can comprise the system's units beingphysically synchronized to their local clocks in accordance with somemaster time. This in itself increases and complicates the hardware inthe units, which in such a case must perhaps still be supported bysoftware resources. All clock operation can be carried out proactively,that is once the clock is to be used, it already shows the time in themaster's time domain and it has only to read this off, which can reducethe unit's response time and in this way justify the greater complexity.The respective unit can itself calculate how it is to regulate its clockusing the master's timestamps of the reference events. The respectiveunit can let the coordinator or translation unit calculate how theregulation and offset compensation are to be carried out by sendingtheir timestamps of the reference events to the same and then awaiting aresponse.

The units can translate their time to another time before the time inquestion is transmitted. This does not need to require any extrahardware, but instead can comprise some software resources, dependingupon how the translation is to be carried out. The translation work iscarried out between production and consumption of the value. The unitcan itself calculate how the translation is to be carried out using themaster's timestamps of the reference events. The unit can let thecoordinator/translator calculate how the translation is to be carriedout by sending its timestamps of reference events to the same and thenawaiting a response. The units need not be aware of another time thantheir own as far as the time relationship is concerned. It is sufficientfor the units to send their respective timestamps of reference events tothe coordinator. This requires relatively little resource in the units.The translator is responsible for all translation/time relating. Thetranslator is arranged with compute power appropriate for thetranslation method.

Depending upon what precision is required for the detection of areference event within a system, a group of individual events can beregarded as one and the same reference event. For example, SOF in CANmessages can be utilized as a reference event. A practical way ofdetecting SOF in CAN is to utilize the sampling point in the CANcontroller. As the detection of SOF in the respective node is dependentupon the setting of the sampling point (which can be different indifferent nodes) and the nodes' distance to the transmitting module, thetime of the detection will vary depending upon which node istransmitting and the setting of the receiving module. If SOF of anymessage is used as a reference event, in practice it is a group ofevents that is utilized.

The precision of the reference event is obviously not sufficient tomeasure, for example, the delay between different messages fromdifferent nodes. This is possible if instead individual CAN messages areselected as reference events (if SOF is to constitute a reference point,the message may not, except in certain special circumstances, have wonthe bit arbitration from a message with lower priority). More precisely,it can be the occurrence of specific edges/bits in the different nodesthat gives the ability to determine delays between units, and the factthat these edges/bits have been propagated in both directions relativeto the delay that is to be determined. Consequently, specific edges/bitsthat have been propagated through the system as undisturbed as possibleare suitably selected for determining delays. An edge/bit that veryprobably originates from only one transmitting unit can be one followingthe arbitration field in a CAN message (however, suitably not the ACKbit, that is transmitted by receiving units).

At the system level, it is known which CAN messages the respective nodestransmit. By each of the transmitting and receiving modules timestampingone and the same message, and messages being sent in both directionsthrough the system, the delays between respective modules can bemeasured and calculated to a common time domain.

In one embodiment, a unit, for example any such unit, can act as timemaster (with or without its knowledge). The units can work with atranslation function for each time that is to be translated/related tothe master time. The translation work is carried out between productionand consumption of the value. This can result in a delay of possibleconsumption of the same.

The translation function can be carried out by the offset between thefirst and second times being added to the time that is to be translated.With this method, little compute power is needed for the respectivetranslation. Synchronization/time relating is preferably carried outfrequently with this method in order to minimize the effect of therespective clock's drift in relation to the other clocks. Thetranslation can also be achieved by both offset and fixed frequencyerror compensation (drift compensation). The translation A_(x) to B_(x)(new and old refer to reference timestamps) can be carried out asfollows:

B _(x) =B _(new)+(B _(new) −B _(old))*(A _(x) −A _(new))/(A _(new) −A_(old))

Given a computer with limited resolution and/or calculation accuracy andgiven that the times A and B are already scaled to be approximatelyequal (the derivative between them is approximately one), the followingmethod can give a better result:

B _(x) =B _(new)−(A _(x) −A _(new))+(((B _(new) −A _(new))−(B_(old) −A_(old)))*(A _(x) −A _(new)))/(A _(new) −A _(old)).

Viewed analytically, the two methods are equivalent and are based onlinear regression. As the calculation is carried out using a computer,discrete values must be used which results in limited possibilities forrepresentation which has the result that the sequence is important.Irrespective of the method, care must be taken that the calculation doesnot overflow or get truncated in an undesirable way. The latter methodcan be a way to make this easier.

There can thus be great computing power per translation but, in return,the time relating does not need to be carried out as often in order toattain the same precision. The constant frequency error can bedetermined offline or the frequency error can be measured online. Therecan also be cable delays of a not inconsiderable size, which must thenbe included in the calculation. In one embodiment, negligible cabledelays are selected. In the offline case, offset and/or frequencydeviation can be measured once and for all and appropriate constantvalues can be calculated and inserted in the translation function.

In one embodiment, where delays can be measured online, units can bearranged so that reference function executions propagate through thecommunication medium in both directions relative to the units whosedelay is to be measured, during which the two units determine theoccurrence of the reference function executions relative to some time.These determined occurrences can be used to determine the delay.

The translator can save information in the respective unit about how theclock behaved during the most recent session in order to be able tophase in the unit in the next function stage more quickly and/or makethe synchronization/time relating easier for the translator.

The more of the abovementioned resources, methods and/or functions thatcan be made dedicated, the more easily predicted and/or easily used andhence perhaps also more reliable is the utilization of clocks, time,time synchronization and/or time relating in the system.

The system described can advantageously be used on a vehicle, forexample a car, lorry, tractor, scooter, boat, ship, airplane, etc. Forthe direct control system in a car, it is advantageous to have timedomains with varying time tick in order to coordinate movements that areassociated with the mechanical function of the driveline. As eachso-called ECU (Electronic Control Unit) comprises a CPU that iscontrolled by an oscillating circuit that is independent of the movementof the mechanics, an ECU has at least two time domains with associatedtransformation operator. One and the same ECU can interact with severalother ECUs that form groups working in a time domain common to therespective group.

The whole system in a car (vehicle) can have a linear finite timedomain, which, for example, starts with the ignition key's “on” positionand which ends with the ignition key's “off” position. In this timedomain, the system behaves in a way expedient for driving the vehicle.When the ignition key is in the “off” position, the system operates in adifferent time domain, for example a circular time where information isobtained from some operating module that periodically listens forcommands from a wireless signal for opening or locking of the car'sdoors and/or control of alarm functions. The car can be comprised inother systems connected with traffic control, traffic monitoring,law-enforcement monitoring, etc., which make completely differentdemands, but which now and then interact with the car's direct controlsystems.

Here, other time domains can be better suited, for example a time domainwhere the time tick varies with the location of the car. In a monitoringsystem, a need to update the car's location can be lower when it is inthe country in normal circumstances than within built-up areas or in thevicinity of an accident. This frees bandwidth requirements in both thecar's control system and the monitoring system. The present disclosurehas a great advantage in that the development of systems that are to beincorporated in larger systems at a later date can be carried outwithout advance planning. When the systems are to be incorporated, therespective systems' event-generating and event-detecting functions arereviewed. As the respective systems have many such functions, there is agreat probability that events will be found that can be utilized asreference events for the coordination of the systems that is required inorder to obtain the required result. If suitable events cannot bedetected during the coordination analysis, expedient or suitableevent-generating or event-detecting functions can be created andintroduced into any one or both systems.

BRIEF DESCRIPTION OF THE DRAWINGS

A currently proposed embodiment of a device that has the significantcharacteristics of the disclosure will be described below with referenceto the attached drawings in which:

FIG. 1 shows a schematic illustration at system level of how variouscomprised module units and systems are logically interconnected,

FIG. 2 shows in detail a unit 103 comprised in FIG. 1,

FIG. 3 shows a simple schematic illustration of a subunit 105 or 350shown in FIG. 1,

FIG. 4 shows a schematic illustration of a first unit 104 comprised inFIG. 1,

FIG. 5 shows two possible ways of measuring delays between units,

FIG. 6 shows how the USB protocol's SOF packets can be utilized for timerelating in a system with a computer, for example a PC, and a number ofunits connected to this,

FIG. 7 shows a traffic system in which the cars utilize localindependent time domains that are coordinated with a traffic monitoringsystem with centrally coordinated, flexible time domains, and

FIG. 8 shows schematically a traffic monitoring system.

DETAILED DESCRIPTION

In FIG. 1, three different systems are symbolized by S1, S2 and S3interconnected to a system S. The systems can be of the types describedin the introduction, for example USB, CAN, Bluetooth, etc. The serialbus connections in the systems are indicated by B1, B2 and B3. Thesystems work with protocols P1, P2 and P3 associated with the standards.In the systems there are one or more first units 104, 104′, 104″. Inaccordance with the disclosure, function events or function executionsin the systems are to be related with regard to some type of time, forexample linear time, circular time, virtual time, etc. The empty boxesin FIG. 1 illustrate other modules connected to their respective bus andwhich could each contain a microcontroller and related clock used, forexample, to read sensor values, control mechanical actuators, or tocontrol electrical devices.

The systems work with a number of functions. Any first function isindicated by F1 and relates to one or more reference times or mastertimes to which the first units can relate. The times in question can be,for example, real and/or virtual. The time that any clock function 352,410, 457 (not indicated in FIG. 1) represents can constitute an exampleof a real time, which can be with or without the knowledge of the unit.An example of a virtual time is an average time extrapolated fromsuitable units' time.

The systems can also comprise one or more second functions F2 thatrepresent translation functions between different times in the system.Depending upon the characteristics of the times, a suitable method isselected for determining the translation functions. If, for example, twotimes both represent linear/modular times with tick of the same size,linear regression of the type is advantageously used.

A third function is indicated by F3 and is arranged togenerate/represent the reference function execution that can at least bedetected by the units that must be able to be related directly. Thisfunction can either be arranged in one or more dedicated new unitsand/or in any one or more existing units. As a proposal, suitableexisting function executions in the system are identified and arrangedto carry out the function. Examples of such suitable existing functionexecutions in a USB system are SOF packets, which, in addition, areprovided with sequence numbers which make easier the correctidentification of specific packets. A proposed existing functionexecution in a CAN system that could be suitable for the disclosure isthe SOF bit or suitable edge/bit inside a message and then preferably anedge/bit that occurs after the identification field, but before the ACKbit. In the case when an edge/bit within the data field constitutes F3,the transmitting unit's Time Reference (Tref) should, in addition, beable to be sent as data in the same packet in order to save time andbandwidth. In order to make the system more stable, an edge/bit in amessage should not be accepted for reference function execution beforethe whole message has been validated.

The first function F1 can, in principle, be arranged to be in any of theunits, with or without their knowledge. The second function F2 must,however, know which unit or units represent the first function F1,assuming that F2 wants to utilize F1 in question. The second function F2can be arranged in one or more of the units. In this case, the units canbe arranged to carry out translations from or to their own times.Alternatively, a unit in question can let any other unit carry out thetranslation in question. The first function F1 can, in turn, besynchronized with or related to another time, for example UTC and thephysical second via GPS, 107. Protocols can be established for how timesare to be interpreted and/or translated. If, for example, a group ofunits is arranged to be able to translate times between themselves,incoming times are selected, for example, that are already translated,while times that are to be sent are first translated to the receivingunit's time or vice versa. Alternatively, as described, F1 can beutilized in the form of both incoming and outgoing times beinginterpreted as or translated to the first function F1.

In one embodiment, a second unit 102 can advantageously be arranged withthe first function F1, the second function F2, the third function F3,the fourth function F4, the fifth function F5 and/or a subunit 105. Suchan arrangement is particularly advantageous if the protocol P2 consistsof USB. In this case, unit 103 should be able to correspond to a unit200, as shown in FIG. 2, which contains one or more units 201, where 201can be internal and/or external USB hubs and/or units such as unit 450in FIG. 4. In one embodiment, the second function may include use of acentralized translator, which means that the first units should be ablebe implemented relatively easily. A decentralization of the translationfunction, on the other hand, causes a somewhat higher complexity of thefirst units, but in return the bandwidth can perhaps be lower and fewerunits can be utilized in the system, while at the same time thereliability can increase as the resources are dispersed and accordinglyno “single point of failure” needs to be introduced.

FIG. 3 also shows a fourth function F4 that detects the functionexecution that the third function F3 generates. The first units 104 inFIG. 1 are arranged with one or more subunits 105. FIG. 3 shows a simpleschematic drawing of unit 104 where unit 300 corresponds to 104 and unit350 corresponds to 105. The subunits 350 comprise one or moretime-perceiving devices 352, function execution detectors F4, andsubunits or capture registers 351 arranged to store times. In the eventof an actual detection, the clock 352 is read off and saved in a subunit351 that saves the reference times in question, here designated Tref.The latter timestamping or reading off can be transmitted to unitscarrying out the second function F2, which for this purpose are arrangedto determine how the translation in question is to be carried out. Ifthe second function F2 is a part of the unit itself, one or more Trefsare awaited from other unit or units, which can be used for determininghow translation to/from this and/or other units is to be arranged to becarried out. Alternatively, a unit's incoming Trefs can be selected inorder to synchronize the local clock to, for example, any F1 on thebasis of one or more timestamp(s). The Tref values can be considered toform the basis for relating all time in the systems. This appliesirrespective of whether it is a question of translating time locally,synchronizing the time in question locally, or leaving the translationto some other unit. As shown in FIG. 3, any of the functions/roles canbe arranged in the unit 300.

One embodiment of the clock function 352 and the subunits 351 is toutilize a counter/timer in a suitable CPU and allowing a detection in F4trigger a reading off of the counter/timer 352 to capture register 351.The clocks are, in other respects, intended to define system times andcan be read off by applications that are executing in the units, incontrast to the clocks that are hidden from the applications such as areoften used in certain time-controlled communication protocols. Anextremely advantageous facility that the disclosure provides is thatclocks can be made as accurate as their applications require, withoutforcing other clocks in the system to be equally accurate.

An advantageous accuracy can be obtained if the first units' times aretranslated directly to each other instead of carrying out thetranslation via one or more first functions F1. More precisely, it canbe said that negative effects originating from, for example, reading offerrors and jitter in system components' electronics and logic can belimited. If, however, it is desired to have all events in the system ona common time axis or basis, for example for analysis, it isadvantageous to utilize a first function F1 and plot the eventsconcerned along the time axis that F1 describes. A fifth function F5,shown in FIGS. 1 and 3, includes a coordinator function which receivesand sends reference timestamps to a unit that requesting the timestampsconcerned, or to all the units that operate with function F2. The fifthfunction F5 suitably determines, with or without guidance from one ormore second functions F2, which unit or units are to operate as or havethe role of F1. The second functions in the system or the systemsshould, in addition, be able to calculate and send/associate translationaccuracy/inaccuracy and/or stability/instability of thetimes/clocks/translations. This is in order not to need to assume thatthe worst case always applies, but instead to be able to utilize currentassumptions.

In the most general case, the units do not need to know the originatorof a specific reference function execution. If the units, however, arearranged to be able to measure any delay over the serial communicationbetween two units, they may, however, be provided with this facility.The delay can, for example, be determined with knowledge of a number ofoccurrences of reference function executions that propagate in bothdirections relative to the units between which the delay is to bedetermined. FIG. 5 shows examples of how this can be carried out.

If unit 102 is, for example, a computer of the PC type with an operatingsystem such as, for example, WINDOWS XP, the functions F1, F2 and/or F5may be able to be implemented in the software that communicates with theOS's interface to the communication channel. The advantage of this isthat PC computers are very common today and often are already used inmany planned target systems and, in addition, usually have resourcesthat can advantageously be utilized. Depending upon the implementationmethod and system requirements, great care must be taken so thatcalculations are carried out with sufficiently short response times,irrespective of what the OS is otherwise engaged in. This embodiment canprovide a simple, flexible and accordingly cost-effective way of, forexample, connecting a computer by means of the hardware to several CANsystems for analysis and/or interaction and, at the same time, provide acompetent way of relating time within and/or between the systems. FIG. 6shows examples of how this can be carried out.

FIG. 4 shows in greater detail than in FIG. 3 a schematic constructionof a unit 104 according to FIG. 1, here designated 400. For the sake ofclarity, it is provided with two microprocessors, but the task can becarried out by one microprocessor. The unit 400 is connected on one sideto a system 401 via the connectors 402, 403 and the connection cable404. Via the interface electronics 405, the signals on the bus can beread by the microprocessor 406. Using instructions stored in the memory407, the signals can be interpreted in accordance with the protocol 408used in the system. In its simplest form, the interpretation can meanthat only the received bit pattern is transferred, but theinterpretation can be of a more complex type where much supplementaryinformation provided by the protocol's rules is added by themicroprocessor. Application software, that is instructions for one ormore applications that process information available to themicroprocessor, is also stored in the memory 407. The information thusinterpreted is transferred to the dual-ported memory 409. Additionalinformation of interest can be added to the interpreted information, forexample timestamping when the information was obtained from the system.The time is obtained from the clock 410 which is triggered to be readoff in a suitable way by the interface electronics 405, 414, 419 oralternatively by function execution detectors 424, 426, 428, for examplewhen reception of a message commences. In order to make the reading offof the clock more independent of the processor 406, the event can bestored temporarily in capture registers 425, 427 and/or 429. Theinformation is stored in the dual-ported memory in an organized way inaccordance with rules depending on the system protocol's requirements,so that specific information is stored in a specific location indicatedby the table 411. The dual-ported memory 409 can be read by themicroprocessor 412 which can communicate, according to a secondprotocol, using rules stored in the memory 413, and physically via theinterface electronics 414, with a second system 415 via the connectors416 and 417. Rules are also stored in the memory 413 for how theinformation stored in 409 according to the rules in 407 and 411 isconverted according to the rules for the second protocol 418. In simplersystems, the second protocol can be based on CAN and several units 400′,400″, etc., of the type 400. In the same way as described above, theunit 400 also contains rules for a third protocol with the interfaceunit 419 and connectors 420 and 421 which connect to the link 422 withthe protocol 423. A suitable protocol can be based on USB.

In order to be able to synchronize a local clock 410 to an externaltime, for example, any F1, the processor should at least be able to seta new value in the clock. For the sake of simplicity and reliability,the interface between the clock and CPU should, however, allow theprocessor to, for example, ask the clock itself to compensate for agiven offset and/or frequency error in a way that is acceptable to theunit and the system.

As the ability to get WINDOWS to carry out tasks in real time is greatlylimited, it can be advantageous to let second unit 102 include aseparate computer system with an OS better suited for the task. Such acomputer system can be a unit or module 450 according to FIG. 4 with amicroprocessor and peripherals specially adapted to handle communicationand calculation problems. A number of modules such as unit or module 400can be connected to the unit 450 via a suitable connection, for examplea USB connection. Such an arrangement has many advantages. The analogand strictly real-time problems are solved by the module 400, while thecalculation-intensive and less real-time-critical tasks are handled bythe unit 450. The module 450 is connected directly to one or moremodules 400 by connectors that are illustrated by 451, 452, 451′, 452′,etc. Communication circuits 453, 453′ are connected to a microprocessor454 with associated peripherals, among other things memory or memories.These memories contain applications software, that is instructions forone or more applications that process information available to themicroprocessor. A memory card 455 is arranged for log equipment,recording and playback capability, etc. A memory 456 connected to themicroprocessor can be written to and read from in two (both) directions,that is from both the system side and the tool side. The memory can bedivided into a number of subsidiary memories with different algorithms456′. The clock 457 can be synchronized with or related to the clock inthe first unit 410 via the protocol in the abovementioned way. To assistwith this, there can be a function execution detector 463 and captureregister 464 arranged in a similar way to components in the unit 400.

In this way, all first units 104 connected to a second unit 102 can betime synchronized or time related. In the same way, second units 102should be able to relate time between themselves. Through timesynchronization of the different units, the execution of theapplications in the different units can be synchronized or related toeach other. Execution of applications or parts of applications that areresponsible for measuring can, in this way, be coordinated withexecution of applications or parts of applications that are responsiblefor communication within and between the different units. This means,among other things, that messages sent according to an event-controlledprotocol, for example CAN, can appear in a time-controlled way, asapplications for the transmission of messages are executed andcoordinated in time.

As a result of the execution of applications for measurements beingcoordinated with the transmission of measurement results, a timerelationship is obtained between the measurement and the distribution ofthe measurement results in the system in the form of messages. The samecan, of course, be carried out for indicated events and messages withinformation about the respective events. Together with the unit 400 andalso with suitable software, the unit 450 can simulate completely orpartially an ECU in an ordinary CAN system in a vehicle. The unit 450can be equipped with means for communication with other networkprotocols, for example Bluetooth 459 and TCP/IP 460 for communicationbetween a network of units 450 and/or tool units implemented in a PC orPDA. As an alternative to storage disks so-called “USB mass storagedevices” can be connected to a USB connection. For communication over atelecommunications network, the unit can be equipped with a GSM module461 and for time synchronization or clock synchronization with a GPSmodule 462 which can also be utilized for position determination. Seeabove, regarding the protocols.

Irrespective of whether the unit 102 includes a normal PC or a unit suchas 450, it can advantageously carry out the function F3, in particularif the selected protocol is USB and the unit is a USB host, which meansthat the unit generates SOF packets. As mentioned above, these aresuited for carrying out reference function executions.

FIG. 5 shows the measuring of communication delays between units, wherethe units 501 and 502 can be of the type, for example, such as unit 400.In the first case, unit 501 sends a message 503 to unit 502 and bothtimestamp the message with their local clock. We can call 501'stimestamp of 503 T_(ref13), and 502's timestamp of 503 T_(ref23).Thereafter, 502 sends a message 504 to 501 which is timestamped by thetwo units. 501's timestamp of 504 can be called T_(ref14) and 502'stimestamp of the same can be called T_(ref24). If, for example, 502thereafter sends T_(ref23) and T_(ref24) to unit 501, 501 can determinethe communication delay, T_(λ)=T_(λ501)+T_(λgem)+T_(λ502), between 501and 502, for example using the following method:

$\quad\left\{ \begin{matrix}{T_{\lambda} = {T_{\lambda 501} + T_{\lambda \; {gem}} + T_{\lambda \; 502}}} \\{T_{\lambda \; {gem}} = {\left( {T_{{ref}\; 27} - T_{{ref}\; 17}} \right) - \left( {T_{{ref}\; 18} - T_{{ref}\; 28}} \right)}}\end{matrix} \right.$

where T_(λ501) and T_(λ502) represent the delay from the units 501, 502to their respective connection point to the communication channel. The“gem” portion of the subscript is derived from the Swedish word for“common” i.e. “gemensam”.

An additional variant of the determining of delays is also the one shownin FIG. 5. Instead, a unit 505 sends a message 507 which, in accordancewith the figure, first reaches 501's connection point in thecommunication channel and then 502's connection point, and 501timestamps the message as T_(ref17) and 502 as T_(ref27). Thereafter,unit 506 sends a message 508 that propagates through the communicationchannel in the opposite direction. This time, the message reaches 502'sconnection point first and thereafter 501's connection point. 502timestamps it as T_(ref28) and 501 as T_(ref18). The delay in the sharedpart of the communication channel T_(λgem) can then be determinedaccording to:

T _(λgem)=(T _(ref27) −T _(ref17))−(T _(ref18) −T _(ref28))

Both these simple variants of delay determination assume that the Trefsutilize time tick of the same size and that any frequency deviationbetween the units 501 and 502 can be made negligible or can becompensated for by any of the methods.

FIG. 6 shows an embodiment of how the USB protocol's SOF packet can beutilized for time relating in accordance with the disclosure. The systemcomprises a number of units 603, 603′, 603″ which can be of the type,for example 104 or 400. These are connected via one or more USB hubs 602(for example of type 103 or 200) to a computer 601, for example a PC,which can also be of the type, for example 102. 601 transmits SOFpackets 651 as it should in accordance with the USB protocol at regularintervals. This can constitute an example of the previously mentionedfunction F3, that is the reference function execution generator orreference event generator.

A Start-Of-Frame packet, SOF, contains typically a Start-Of-Packet/Syncfield 691, an identification field 692, the identification fieldinverted 693, frame number 694, CRC field 695 and finally anEnd-Of-Packet field 696.

The unit 603 contains a USB controller 631 which in turn contains adevice 632 designed to detect SOF packets 651. The detections in 632 arearranged to trigger a reading of clock 634 to a capture register 633.The time stored in this way is hereafter called Tref. Both the clock 634and the capture register 633 can be read by the microprocessor 635. Both633 and 634 should advantageously be able to be incorporated in 635.Program code is stored in the memory 636 which, for example, is run eachtime 635 receives an SOF packet from 631. The program can, for example,read off the frame number on the SOF packet and, depending upon therequirements and conditions always or at certain intervals read out Treffrom 633 and send a new USB packet 652 using 631 via 602 to 601. 603also contains interface electronics 637 for a CAN controller 638 which,in turn, contains a precise detection mechanism 638′ for detecting whenthe CAN messages commence.

The detection mechanism 638′ also triggers the capture register 639which then reads clock 634. The timestamp which is to be found incapture register 639 can be sent, together with the message thattriggered the reading in a packet 653 to 601. The packet type 653′ can,for example, include USB overhead, 642 and 642″″, data, 642′, from theCAN controller 638, a timestamp, 642″, of when the data 642′ wasreceived by 638, and if required more data with associated timestamps,642′″. The packet type 652′ contains, in addition to the overhead, 641,641″″, that USB adds, a Tref, 641′, the sequence number of the SOF thatgave rise to the Tref, 641″, and, if required, more Trefs withassociated sequence numbers and/or other data, 641″″.

Computer or processor 601 is arranged with a USB host 671. As alreadymentioned, 671 sends SOF packets 651 t regular intervals in accordancewith the USB protocol. When the computer receives packets of the type652 from its connected units 603, 603′, etc., via the USB host 671,these can be read and processed by the processor 672 using program codein the memory 673. Among other things, program code according to thelogical data flow chart in 680 is run in the processor. Unit 681represents here the USB drive routines that constitute a part of theoperating system that processor 601 utilizes. These contain, among otherthings, checks on the physical structure of the USB system, and read outthe data packets from the controller 671. If these packets originatefrom any of the units 603, 603′, etc., they are forwarded via thetime-handling functions 682 to the drive routines 683 intended for thepurpose. If the messages are packets of the type 652, the information652′ is retrieved from them, that is the so-called Trefs 641′, also thesequence numbers 641″ and any other data 641′″, and they are takencharge of by the time-handling functions 682 which are a part of 683.

The system is, after all, also intended to be used and it is representedhere by a user application 685 which logically communicates directlywith the units 603, etc., but in practice this is carried out via thecommonly used interface 684 which provides all the functions that a usercan utilize in the units. The interface 684 thus connects together theprogram 685 with units' drive routines 683. The interface displays, forexample, if so required, all timestamps from the different units alongone and the same time axis, which is carried out using the time-handlingfunctions 682 completely in the spirit of the disclosure. In the figure,this is exemplified by the message 653 sent from a unit 603 to 601. Unit671 decodes the packet and forwards the content 653′ to the processor672 for further processing. For example, unit 681 sees that the messageoriginates from a unit of type 603 and forwards it to the drive routines683 intended for the purpose. The time-handling functions 682 in 683 seethat the message contains a timestamp 642″ in a local unit's time, andso it translates this to a suitable time according to, for example, thefollowing procedure. The translated time, 643′, and any calculatedinaccuracy 643″, are displayed together with data, 643, (that is 642′possibly further processed by 683) and any other information 643″″,taken as a whole 653″, to the application 685 via the interface 684.

The time-handling functions 682 can be divided into a part that savesand handles a history 682′ of Trefs with sequence numbers that come fromthe packets 652′ and information about the originating unit and keeptranslation functions updated and a second part that carries out theactual translations. In order to be able to carry out direct translationbetween the times of all units, a type of logical translation matrix 686can be utilized. For each pair of units 687, 687′, etc., whose time isto be able to be translated directly, there is a list 688 with mostrecently matched pairs of Trefs 688′, 688″, etc. These Trefs 688′, etc.,can then be utilized to carry out a translation between the times of thecomprised units, for example according to:

B _(x) =B _(new)+(B _(new) −B _(old))*(A _(x) −A _(new))/(A _(new) −A_(old)) or

B _(x) =B _(new)−(A _(x) −A _(new))+(((B _(new) −A _(new))−(B _(old) −A_(old)))*(A _(x) −A _(new)))/(A _(new) −A _(old)).

where A_(x) is to be translated to B_(x) using the matched Tref pairs(A_(new), B_(new)) and (A_(old), B_(old)) which can thus correspond to688′ and 688′″. As can be seen, there is a part of the calculations thatcan be carried out in advance, for example (B_(new)−B_(old)) and(A_(new)−A_(old)) in first alternative and (B_(new)−A_(new)) and(B_(old)−A_(old)), etc., in second alternative. Such calculations can,as stated, advantageously be performed in advance and saved in alocation 689 designed for the purpose in order to simplify and therebyspeed up future translations. Statistical inaccuracy concerned can alsobe calculated and saved in a location 689′ designed for the purpose. Itis, of course, possible to make an extremely complex and exhaustiveestimate of any inaccuracy on the basis of the whole history of matchedTref pairs, but in order to give a simple illustrative example, one ofthe Trefs in a pair 688′ can, for example, be translated using two otherpairs in the list 688. The translated Tref is then compared with theactual Tref in the pair. The difference between them can be regarded asa simple measurement of inaccuracy/non-linearity.

Another variant of the translation matrix can be to let a row or columnrepresent a virtual time, on the basis, for example, of some weightingof suitable other times.

A simpler variant of the translation matrix is the special case whenonly one or a few rows or columns in the matrix are kept updated in theway mentioned above. As each row or column can give information abouthow relating can be carried out from and to a particular time, this timecan be utilized as a kind of intermediate master time in translationbetween two other times. This can be a less memory- and/orresource-intensive alternative to keeping the whole matrix updated at acost of slightly more complicated translations and/or possibly greaterinaccuracy. The intermediate master time here can constitute examples ofthe function F1.

The time-handling or translation function F2/682 can be broken down intoa number of elements that, however, do not all necessarily need to becarried out in each unit arranged with the function. Certain elementscan be carried out by one unit that then sends the information toanother unit that then does not need to carry out the element. Examplesof element functions include:

-   -   collecting and keeping track of time-stamped reference function        executions for each time that is to be able to be translated.    -   finding, from among the collected timestamps, timestamps from        different units of the same reference function execution.    -   determining, on the basis of these matched timestamps, how any        translation is to be carried out depending upon given        conditions.    -   determining, on the basis of timestamps, how stable/accurate a        particular time can be considered to be, for example using        statistics.    -   demanding, if a time is considered to be unstable/inaccurate,        more frequent timestamped reference function executions from the        system.    -   carrying out translations when so requested.

The time-handling functions can be considered to be an example of thetranslation function F2.

In the systems, S1 can thus, for example, work with local translation oftime, S2 with centralized translation and S3 with local synchronization.Of course, it is also possible to combine different variants in one andthe same system.

The event recognitions are to be arranged or are to form the basis foror invoke functionality in the system, such as, for example, analysis.Items of such functionality are represented in FIG. 1 by F6 and F7.

FIG. 7 shows a simplified car system 900 that includes a number ofevent-generating subsystems that are exemplified by a motor 901, agearbox 902, four wheels 903, 904, 905 and 906 and the doors 907 and908. Other Electronic Controller Units (ECU) that are required for thecar's functions are symbolized by 900′. Each event-generating subsystemhas an event-generating and event-detecting ECU. The motor ECU 909,gearbox ECU 910 and the wheel ECUs 911, 912, 913 and 914 are connectedto the CAN network 915. The door ECUs 916 and 917 are connected to theLIN network 918. The LIN master 919 is connected to both the LIN network918 and the CAN network 915. A system-controlling and monitoring unit orsystem module 920 is also connected to the CAN network. External unitssuch as diagnostics instruments, programming devices, analysisinstruments, etc., represented by 921, can be connected to the systemvia the connector 922 and a connection cable 923. Contact with externalunits 924 can also be carried out via the radio unit 925 and the radiolink 926 in the monitoring unit 920. In a first stage, the monitoringunit 920 controls all the other modules in a first time domain where notime is transferred before a wake-up event is transmitted over the CANbus. In this mode, the system's energy consumption is very low. Themonitoring unit itself is in another low-consumption time domain where atime tick event is generated by an internal clock 920′, for example 10times per second. This event initiates listening for incoming signalsfrom an external unit 924, for example a signal concerning opening ofdoors. If such a signal is detected, the monitoring unit sends a wake-upsignal over the CAN bus and all the ECUs change to a respective localtime domain which is suitable for CAN and LIN communication and forinternal event detection and event generating. A command concerningopening doors is given to the unit 919, which in turn commands the units916 and 917 to open the doors.

The ECUs controlling rotating parts establish their own time domains onthe basis of the speed of rotation. In its simplest form, time baseevents are generated by pulse-generating wheels 930 and apulse-detecting device 931. In this example, a pulse is generated withinverted sign by a sensor 932. The device 931 detects the pulse train933 which is forwarded to the ECU 934 which thereby creates a clockfunction 934′ with a circular time base with a time tick thatcorresponds to a rotation of 22.5 degrees. Time is thus measured locallyin past wheel angle units. If the wheel stops, then the local timestops. The ECU 934 can control the brakes 935. The time base varies withthe speed of rotation of the wheel compared to a time base based on thephysical second. A controlling unit 936 with a time base 937 based onthe physical second can give commands K1 to and receive reports R1 fromthe unit 934. By means of status reports from the four wheels, the unit936 can determine how the wheels are moving relative to each other andcommand them to increase or decrease the braking force while turning. Ifa wheel locks, then the time there will stop and reporting will cease.This situation is easily detected by the unit 936, partly by the otherwheels reporting, and partly as a result of an expected report inrelation to the internal time domain not having arrived.

More complicated time domains can be constructed when expedient. Theevent generator 940 generates two pulses per revolution with invertedsign and 45 degrees interval. These are detected by the detector unit941 and transferred to the local translator or counter 942 in the ECU943 via the link 944. The generated time domain is shown as 945. The ECU943 has an internal clock 946 which generates the time domain 947. Thereis a pressure sensor 948 in the system which gives pressure informationin discrete steps to the unit 943 via the link 949, where each step canbe regarded as an event. Passage of certain of these events can beutilized in order to generate a time tick. The pressure sensor isconnected to a cylinder 950 in the motor 901. The ECU 943 controls theelectrical valve arrangement 951. The local translator 942 compiles theinformation from the time domains 945 and 947 and 948 into a new timedomain 952 that is suitable for valve control. The control unit 953gives control commands to the valve control mechanism 951 via the link954 in the time of the time domain 952. The local translator 942 therebyobtains a clock function viewed from the unit 953. In this way, a“virtual camshaft” can be created, where the characteristics of thecontrol algorithm are changed by the time domain 952 being changed inaccordance with variations in speed of revolution and pressure.

A unit 921 can be connected to the system for analysis or diagnostics.The various nodes can have stored in their memories a translationalgorithm that states how their respective time domains are transformedto a linear time domain based on the physical second. The instrument 921can request that the respective modules transmit the translationalgorithms. This assumes that the utilized HLP (Higher Layer Protocol)supports such a procedure. Otherwise, the algorithms are to be found inthe system's documentation. Alternatively, the algorithms are stored inthe system module 920.

FIG. 8 shows a schematic traffic-monitoring system. Traffic control andtraffic monitoring are an increasing problem in society. Increasingnumbers of cars are equipped with GPS and GSM in order to make thingseasier for the car's driver. This development is taking place largelyindependently of the social problem. A simple solution to the problem isto standardize a fixed local time domain for all cars and for themonitoring system to work with time domains that vary geographically andaccording to requirements. The cars are obliged to be equipped with GPSreceivers and transmitters linked to a communication network determinedby society and to use these to report their position periodically, forexample every ten seconds. If a collision occurs, this is reportedimmediately, with information from relevant collision-related sensors.The road network is covered by communication cells 970, 970′, 970″,etc., of a suitable size. Each cell is served by a base station 971,971′, 971″, etc., connected to a cable-based (optical or copper) network972. The control and monitoring system is also connected to this,symbolized by 973. A number of cars 974, 974A, 974B, 974C, 974D, 974Eare driving along the road 975. Every ten seconds, they transmit theirposition according to GPS exemplified by 976, 976′. In addition toposition, additional information can be sent, for example speed,estimated damage in the event of a collision, number of passengers,etc., as an anonymous or identified transmitter depending uponlegislation. Each base station carries out a first processing andcompiling of data, for example the number of passing cars per minute,accidents that have occurred, exceeding of speed limits, etc., andcompiles this in a report 977. Each base station is allocated at leasttwo local time domains by the unit 973, for example a circular timedomain with transit time of 1 minute and a linear limited time domain,with a start time upon a particular type of message being received fromthe cars, for example collision messages that extend up to and include atransmitted report to the unit 973. In this way, the utilization of theroad communication network is optimized. The traffic information arrivesregularly once per minute over the link 973, dispersed in time as thelocal time domains are not synchronized with each other. In the event ofa collision, reporting is carried out immediately and can thereby bedealt with quickly. The transmitted message from the damaged car becomesa reference event between the system cars and the monitoring system. 973can, as required, change time domains, and the bandwidth of network 972can be made available for other information, for example commercialcommunication. The cars' time domains do not need to be related to thetime domain of the monitoring system. It can easily be seen that theconcept of the disclosure can be varied in many ways for controlling andchanging characteristics and relationships of systems to those of othersystems so that they will work together.

The disclosure is not limited to the embodiments described above asexamples, but can be modified within the framework of the followingclaims and the concept of the disclosure.

1. A system, comprising: a detector unit configured to detect a firstreference event having a first time base generated in response tomovement of a part in a machine and to transfer the first referenceevent; a pressure unit configured to detect a second reference eventhaving a second time base in response to sensor information within acylinder in a motor and to transfer the second reference event; aninternal clock having a third time base; and a translator unitconfigured to receive and compile the transferred first and secondreference events and the third time base into a control time base and tosend the control time base to a control unit.
 2. The system of claim 1,wherein the control unit is configured to send control commands usingthe control time base to a valve control mechanism.
 3. The system ofclaim 1, wherein the sensor information comprises pressure information.4. The system of claim 1, wherein the movement of a part in a machinecomprises a wheel rotation.
 5. The system of claim 1, wherein the firstand second time bases are non-linear.
 6. The system of claim 1, whereinthe third time base is linear.
 7. The system of claim 4, wherein thedetector unit comprises a pulse generator and pulse detector.
 8. Thesystem of claim 7, wherein the reference event comprises the pulsegenerator generating a pulse in response to the wheel rotation and thepulse detector detecting the pulse.
 9. A system, comprising: a detectorunit configured to detect a reference event generated in response tomovement of a part in a machine; a first control unit configured togenerate a first report comprising a first clock function based on thedetected reference event, a messenger unit configured to transmit thefirst report; and a second control unit, configured to receive the firstreport, comprising a second time base and a translator unit that isconfigured to compile the first time base and the second time base intoa control time base.
 10. The system of claim 9, wherein the secondcontrol unit is further configured to determine commands based on thefirst reports and to send the commands operating on the control timebase to the first control unit.
 11. The system of claim 9, wherein themovement of a part in a machine comprises a wheel rotation.
 12. Thesystem of claim 9, wherein the detector unit comprises a pulse generatorand pulse detector.
 13. The system of claim 9, wherein the first timebase is circular and the second time base is linear.
 14. The system ofclaim 10, wherein the command messages control a braking force appliedto the wheel.
 15. The system of claim 12, wherein the reference eventcomprises the pulse generator generating a pulse in response to thewheel rotation and the pulse detector detecting the pulse.
 16. Thesystem of claim 14, wherein the pulse is generated with an invertedsign.
 17. A system, comprising: a detector unit configured to detect areference event; an interface unit configured to interface between thedetector unit and a processor, the processor configured to: interpretthe reference event using instructions stored in a first storage unit,and transfer the interpreted reference event to a second storage unit;and a clock configured to determine a reference time of the detectedreference event.
 18. The system of claim 17, wherein the interface unitis further configured to obtain a first reference time from the clock.19. The system of claim 17, further comprising a function executiondetector that obtains a second reference time from the clock.
 20. Thesystem of claim 19, further comprising a capture register configured toreceive the reference event from the function execution detector and totemporarily store the reference event.